package io;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class demo9 {
    public static void main(String[] args) throws IOException {
        //使用字符流进行读文件操作
        Reader reader = new FileReader("./test.txt");
        while(true){
            int ret = reader.read();
            if(ret==-1){
                break;
            }
            char ch = (char)ret;
            System.out.println(ch);
        }
        reader.close();
    }
}
